#!/bin/bash


yum install wget curl sudo -y

# remove all Java packages
yum remove java* -y

# download Oracle JDK 8 package
cd /root
wget http://45.78.34.91/cm/yum/oracle-j2sdk1.8-1.8.0+update181-1.x86_64.rpm

# install Oracle JDK 8 package
rpm -ivh oracle-j2sdk1.8-1.8.0+update181-1.x86_64.rpm

echo "恭喜，Java安装完成，请根教程继续下一步安装"